/**
 * 工单 api 封装
 *
 * @Author:    AKITA
 * @Date:      2025-04-19 08:57:48
 * @Copyright  AKITA
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const mmordApi = {

  queryPage: (param) => {
    return postRequest('/mmord/queryPage', param);
  },

  add: (param) => {
    return postRequest('/mmord/add', param);
  },

  update: (param) => {
    return postRequest('/mmord/update', param);
  },

  delete: (id) => {
    return getRequest(`/mmord/delete/${id}`);
  },

  batchDelete: (idList) => {
    return postRequest('/mmord/batchDelete', idList);
  },

  info: (param) => {
    return getRequest('/mmord/info/' + param);
  },
  batchInsert: (param) => {
    return getRequest(`/mmord/batchInsert?docEntry=${param}`);
  },
};

export const mmordaApi = {
  /**
   * 分页查询  @author  AKITA
   */
  queryPage: (param) => {
    return postRequest('/mmorda/queryPage', param);
  },

  /**
   * 增加  @author  AKITA
   */
  add: (param) => {
    return postRequest('/mmorda/add', param);
  },

  /**
   * 修改  @author  AKITA
   */
  update: (param) => {
    return postRequest('/mmorda/update', param);
  },

  /**
   * 删除  @author  AKITA
   */
  delete: (id) => {
    return getRequest(`/mmorda/delete/${id}`);
  },

  /**
   * 批量删除  @author  AKITA
   */
  batchDelete: (idList) => {
    return postRequest('/mmorda/batchDelete', idList);
  },

  deleteLine: (param) => {
    return postRequest('/mmorda/deleteLine', param);
  },
};

export const mmordbApi = {
  queryPage: (param) => {
    return postRequest('/mmordb/queryPage', param);
  },

  add: (param) => {
    return postRequest('/mmordb/add', param);
  },

  update: (param) => {
    return postRequest('/mmordb/update', param);
  },

  delete: (id) => {
    return getRequest(`/mmordb/delete/${id}`);
  },

  batchDelete: (idList) => {
    return postRequest('/mmordb/batchDelete', idList);
  },

  deleteLine: (param) => {
    return postRequest('/mmordb/deleteLine', param);
  },
};
